package com.ophiux.wechat.controller;

import com.ophiux.common.core.base.Result;
import com.ophiux.wechat.model.dto.OphiuxProblemAggregationDTO;
import com.ophiux.wechat.service.OphiuxProblemService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @desc:
 * @author: hhl
 * @date：2023/5/4 17:11
 */
@RestController
@RequestMapping("/problem")
@Api(tags = "问题API")
public class ProblemController {

    @Autowired
    private OphiuxProblemService ophiuxProblemService;

    @GetMapping("/getProblemList")
    public Result<List<OphiuxProblemAggregationDTO>> getProblemList(@ApiParam("使用类型：1-门诊；2-住院；") Integer useType){
        return Result.success(ophiuxProblemService.getProblemList(useType));
    }

}
